-- GENERATED SPELL FOR [Amberpine Scout] --


function spell0_27117(pUnit, Event) --@Deterrence,Self--
pUnit:FullCastSpellOnTarget(31567,pUnit)
pUnit:RegisterEvent('Sorts_27117', 10274, 1)
end

function spell1_27117(pUnit, Event) --@Puncture Armor,n/a--
pUnit:FullCastSpellOnTarget(35918,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27117', 30282, 1)
end

function spell2_27117(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(15547,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27117', 640, 1)
end

function Sorts_27117(pUnit, Event)
local choix_sorts_27117 = math.random(0, 2)
if choix_sorts_27117 == 0 then
pUnit:RegisterEvent('spell0_27117', 1, 1)
end
if choix_sorts_27117 == 1 then
pUnit:RegisterEvent('spell1_27117', 1, 1)
end
if choix_sorts_27117 == 2 then
pUnit:RegisterEvent('spell2_27117', 1, 1)
end
end

function mob27117_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27117', math.random(1500, 3000), 1)
end

function mob27117_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27117_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27117_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27117, 1, 'mob27117_Action')
RegisterUnitEvent(27117, 2, 'mob27117_Leave')
RegisterUnitEvent(27117, 3, 'mob27117_Kill')
RegisterUnitEvent(27117, 4, 'mob27117_Die')
